Skip to content

DEV-1115: build against driver 0.11.11_beta by default - #135

Merged
JongChern merged 1 commit into
masterfrom
DEV-1115_driver_0_11_11
Oct 23, 2026
Merged

JongChern merged 1 commit into
masterfrom
DEV-1115_driver_0_11_11

Conversation

@JongChern

Copy link
Copy Markdown
Contributor

DEV-1115. The default driver (-PdriverVersion unset) moves from 0.11.7_beta to 0.11.11_beta, the newest Java API release. It's what CI, PR dry runs and local builds use; Release Android API already picks the newest Java API release, so until now CI tested a driver four releases older than the one a release ships.

What 0.11.11_beta brings to Android, with nothing to port

These fixes are in driver code Shimmer inherits rather than overrides:

  • DEV-1266 (Shimmer-Java-Android-API#334): the IO thread and a timer took the instruction list's two locks in opposite orders and deadlocked, hanging every later call. 5 of 12 Android HIL inStream runs hung this way on 0.11.7_beta.
  • DEV-1306 (#337): a stop's reply retired the wrong instruction, so a configuration written straight after stopStreaming() lost its sampling-rate chunk, and a command queued after the stop could go unsent. The fix is in operationPrepare() and the IO thread's stop handling, which Shimmer doesn't override.
  • DEV-1310 (#338): deepClone() of a connected device could throw ConcurrentModificationException, or return null while packets waited for the processing thread. Shimmer and Shimmer3BLEAndroid clone by serialisation and get the driver's fix.

The driver's DEV-1275 and DEV-1291 fixes don't reach Android this way, because Shimmer overrides the code they changed; they're ported in #132 and #133.

Docs

AGENTS.md described the pin as two hard-coded versions and an unpublished shimmerbluetoothmanager 0.11.8_beta. It now describes the single default, the release's -PdriverVersion, and that each Java API release publishes both artifacts at the same version.

Tested

CI builds the library and the examples against 0.11.11_beta. The Android HIL runs on the bench with this and the port PRs together before the release.

🤖 Generated with Claude Code

The default driver was still 0.11.7_beta, so CI, PR dry runs and local
builds tested a driver four releases older than the one Release Android API
picks (the newest Java API release). 0.11.11_beta brings fixes that reach
Android only through the driver, with nothing to port:
- DEV-1266: the IO thread and a timer deadlocked on the instruction list
  and the device, hanging every later call (seen in 5 of 12 Android HIL
  inStream runs);
- DEV-1306: a stop's reply retired the wrong instruction, so a
  configuration written straight after stopStreaming() lost its
  sampling-rate chunk;
- DEV-1310: deepClone() of a connected device could throw
  ConcurrentModificationException, or return null while packets waited.

AGENTS.md described the pin as two hard-coded versions and an unpublished
shimmerbluetoothmanager; it now describes the single default, the release's
-PdriverVersion, and that each Java API release publishes both artifacts.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@JongChern

Copy link
Copy Markdown
Contributor Author

Verified on hardware: the DEV-1266 deadlock is in 0.11.7_beta and gone in 0.11.11_beta

I reproduced it with #136's new queueStress scenario. The unit is connected and idle, and four threads queue battery and status reads for 60 s. The phone was an M2101K6G on Android 11, with a 1-byte link CRC.

Driver s3-3e36 (Shimmer3 v1.1.7, Classic) s3r-2f31 (Shimmer3R v1.1.22, BLE)
0.11.7_beta (master's pin) deadlocked, 2 of 2 runs deadlocked, 1 of 1 run
0.11.11_beta (this PR) passed 2 of 2 (556 and 565 reads) passed 2 of 2 (426 and 420 reads)

Each deadlock's thread dump shows the IO thread blocked in getInstruction(), holding the queue, while the reading threads are blocked in writeInstruction(), holding the device. It reproduces on both transports because both use the driver's IO thread.

Not covered yet: DEV-1306 and DEV-1310, which this bump also brings, haven't been checked on Android hardware.

🤖 Generated with Claude Code

@JongChern
JongChern merged commit 863af1e into master Oct 23, 2026
1 check passed
@JongChern
JongChern deleted the DEV-1115_driver_0_11_11 branch October 23, 2026 13:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant